package com.yunzhi.www.smarthome;

import android.app.Application;
import android.content.Context;

import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;
import com.yunzhi.www.fromlibrary.core.CoreConfig;

/**
 * Created by XYLi on 2017/3/20.
 */

public class BaseApplication extends Application {
    private RefWatcher refWatcher;

    public void onCreate(){
        super.onCreate();
        CoreConfig.init(this);
        refWatcher= LeakCanary.install(this);
    }
    public static RefWatcher getRefWatcher(Context context) {
        BaseApplication application = (BaseApplication) context.getApplicationContext();
        return application.refWatcher;
    }
}
